package cartas;

import aima.search.framework.StepCostFunction;

public class CartasStepCostFunction implements StepCostFunction{

	@Override
	public Double calculateStepCost(Object fromState, Object toState,
			String action) {
		CartasEstado estadoOriginal = (CartasEstado) fromState;
		CartasEstado estadoDestino = (CartasEstado) toState;
		
		return (double)estadoOriginal.getNumCartas() - estadoDestino.getNumCartas();
	}

}
